<template>
<span class="op_dir_Model-wrapper">
  <button v-if="btns.proExportConf" title="生成导出配置"
          class="ui circular icon primary button tiny"
          @click.stop.prevent="proExportConf()">
          <i class="icon file"></i>
        </button>
  <button v-if="btns.pro_op_auth" title="生成操作权限"
          class="ui primary button tiny"
          @click.stop.prevent="pro_op_auth()">
          {{btns.pro_op_auth}}
        </button>
</span>
</template>
<script type="text/ecmascript-6">
    import tool from 'src/util/tool';
    import util from '_util/index';
    import logic from '_logic';
    import in_array from 'in_array';

    import btn_group from 'components/common/btn_group';


    export default {
        data() {
            return {}
        },
        components: {},
        methods: {
            proExportConf(){
                logic.list.checkIds(this,(selected_ids)=> {
                    let url = tool.getApi(this, 'Model', 'proExportConf');
                    util.http.SR(this, url, {selected_ids}, '生成成功');
                });

            },
            pro_op_auth(){
                logic.list.checkIds(this,(selected_ids)=> {
                    let url = tool.getApi(this, 'Model', 'pro_op_auth');
                    util.http.SR(this, url, {selected_ids}, '生成成功');
                },null,true);

            },
        },
        computed: {

            ctl(){
                return this.$route.query.ctl;
            },
            is_admin(){
                return util.is_admin(this);
            },
        },
        props: ['btns'],
        created() {
        },
    };
</script>
<style rel="stylesheet/less" lang="less">@dir: "header/";</style>
